#命令格式
"""列表列表的格式，[[]]
第一位0代表执行该命令，其他为不执行该条命令
第二位表示要发送的AT命令
第三位表示预期返回的结果"""

Base = [[0, "AT", "OK"]
    , [0, "AT+CEREG?", "0,1"]
    , [0, "AT+CPIN?", "READY"]
    , [0, "AT+CREG?", "0,1"]
    , [0, "AT+CGREG?", "0,1"]
    , [0, "AT+CGATT?", "1"]
        ]

TCP = [[0, "AT+CEREG?", "0,1"]
    , [0, "AT+CSTT", "OK"]
    , [0, "AT+CIICR", "OK"]
    , [0, "AT+CIFSR", ""]
    , [0, "AT+CIPSTART=TCP,115.29.164.59,40432", "CONNECT OK"]
    , [0, "AT+CIPSEND=5", ""]
    , [0, "SADAS", "SEND OK"]
    , [0, "AT+CIPCLOSE", "CLOSE OK"]
    , [0, "AT+CIPSHUT", "SHUT OK"]
       ]

TCP_SEND = [[0, "AT+CIPSTART=TCP,115.29.164.59,40432", "CONNECT OK"]
    , [0, "AT+CIPSEND=100", ""]
    , [0, "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890",
       "SEND OK"]
    , [0, "AT+CIPSEND=256", ""]
    , [0,
       "9827878657222759185625798866924078576434787704103876038828474785372043626030393952018533636866399496184959030893490042015819220983938490316547719944685957401473520286406299201515481439783262427248243566751690679228214368950365530423582162352181817902451975",
       "SEND OK"]
    , [0, "AT+CIPSEND=550", ""]
    , [0,
       "qwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiopqwertyuiop",
       "SEND OK"]
    , [0, "AT+CIPSEND=1460", ""]
    , [0,
       "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890",
       "SEND OK"]
    , [0, "AT+CIPCLOSE", "CLOSE OK"]
    , [0, "AT+CIPSHUT", "SHUT OK"]
            ]

HTTP = [[0, 'AT+SAPBR=3,1,"CONTYPE","GPRS"', "OK"]
    , [0, 'AT+SAPBR=3,1,"APN",""', "OK"]
    , [0, "AT+SAPBR=1,1", "OK"]
    , [0, "AT+HTTPINIT", "OK"]
    , [0, 'AT+HTTPPARA="CID",1', "OK"]
    , [0, 'AT+HTTPPARA="URL","https://www.baidu.com"', "OK"]
    , [0, "AT+HTTPSSL=1", "OK"]
    , [0, "AT+HTTPACTION=0", "0,200"]
    , [0, "AT+HTTPREAD=0,319488", ""]
    , [0, "AT+HTTPTERM", "OK"]
        ]
TOUCH = [
    [0, "AT+FSCREATE=YU_N0123456789001234567890012345678900123456789001234567890---.g", "OK"]
    , [0, 'AT+FSCREATE="TEST128"', "OK"]
    , [0, "AT+FSCREATE=123_GO", "OK"]
]

Write_file = [
    [0, "AT+FSWRITE=TEST128,0,50,20", ""]
    , [0, "e5*AI8pw@e7-#8A3K%AnNRBOq4JHx+5Odn9qP16FvJwm2eS+U*", "OK"]
]

Read_file = [
    [0, "AT+FSREAD=TEST128,0,50,9", "OK"]
]

MQTT = [
    [0, 'AT+MCONFIG="TEST_winny","user","password"', "OK"]
    , [0, 'AT+MIPSTART="lbsmqtt.airm2m.com",1884', "CONNECT OK"]
    , [0, 'AT+MCONNECT=1,60', "CONNACK OK"]
    , [0, 'AT+MSUB="/hello/test",0', "SUBACK"]
    , [0, 'AT+MQTTMSGSET=0', "OK"]
    , [0, 'AT+MPUB="/hello/test",0,0,"***PPPPP1234A___+++=="', "OK"]
    , [0, 'AT+MQTTMSGGET', "OK"]
]

cmd_set = [Base, TCP, HTTP, TOUCH, Write_file, Read_file, MQTT]
